@import "_variables";
@import "_mixins";

*,
html {
	box-sizing: border-box;
}

html {
	background: var(--background-color);
}

html.transition {
	@include transition-timing;
	transition-property: background;
}

[hidden] {
	display: none !important;
}

body {
	font-size: 16px;
	font-family: $body-font;
	text-rendering: optimizelegibility;
	-webkit-font-smoothing: antialiased;
	color: var(--font-color);
	line-height: 1.5;
	margin: 0;
}

code {
	font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
	-moz-tab-size: 2;
	tab-size: 2;
	background-color: var(--inline-code-background-color);
	padding: 2px 5px;
	border-radius: 2px;
}

pre code {
	background: none;
	padding: 0;
}

h1 {
	font-size: 2em;
	line-height: calc($body-line-height / 2em);
}

h2 {
	font-size: 1.5em;
	line-height: calc($body-line-height / 1.5em);
}

h3 {
	font-size: 1.2em;
	line-height: calc($body-line-height / 1.2em);
}

h4, h5 {
	font-size: 1em;
	line-height: calc($body-line-height / 1em);
}

h1,
h2,
h3,
h4,
h5 {
	color: var(--logo-font-color);
	font-weight: bold;
}

a, .link {
	color: var(--logo-font-color);
	text-decoration: underline;
	cursor: pointer;

	&:hover {
		text-decoration: none;
		color: var(--link-hover-color);
	}

	&:active {
		color: var(--primary-color);
	}
}

.no-scroll {
	overflow: hidden;
}

.main {
	width: 100%;
}

.page-main {
	@include mobile-only() {
		margin-top: 64px;
	}
}

.skip-to-content a {
	@include transition-timing;
	transition-property: top;
	position: absolute;
	right: 0;
	top: -40px;
	padding: calc($unit / 2) $unit;
	z-index: 100;
	background: var(--logo-font-color);
	color: var(--container-color);
	font-weight: bold;
}

.skip-to-content a:focus{
	position: absolute;
	right: 0;
	top: 0;
	padding: $unit;
	z-index: 100;
}

.sr-only {
	display: none;
}

@media (prefers-reduced-motion) {
	* {
		transition: none !important;
	}
}

.foreground-svg {
	path, polygon {
		fill: var(--font-color);
	}
}

:root {
	scroll-padding-top: 80px;
	color-scheme: light only;

	@include mobile-only {
		scroll-padding-top: 64px;
	}
}

@include dark-mode {
	color-scheme: dark only;
}
